home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Graphics Programming (2nd Edition) / Visual Basic Graphics Programming 2nd Edition.iso / OldSrc / CH3 / SRC / SYSMAP.BAS < prev    next >
BASIC Source File  |  1996-01-23  |  1KB  |  24 lines

  1. Attribute VB_Name = "SysMap"
  2. Option Explicit
  3.  
  4. Global Const RASTERCAPS = 38    ' Raster device capabilities.
  5. Global Const RC_PALETTE = &H100 ' Has palettes.
  6.  
  7. Type PALETTEENTRY
  8.     peRed As Byte
  9.     peGreen As Byte
  10.     peBlue As Byte
  11.     peFlags As Byte
  12. End Type
  13.  
  14. #If Win32 Then  ' 32-bit VB.
  15.     Declare Function GetDeviceCaps Lib "GDI32" (ByVal hDC As Integer, ByVal nIndex As Integer) As Integer
  16.     Declare Function GetPaletteEntries Lib "GDI32" (ByVal hPalette As Integer, ByVal wStartIndex As Integer, ByVal wNumEntries As Integer, lpPaletteEntries As PALETTEENTRY) As Integer
  17.     Declare Function GetBitmapBits Lib "GDI32" (ByVal hBitmap As Integer, ByVal dwCount As Long, lpBits As Any) As Long
  18. #Else           ' 16-bit VB.
  19.     Declare Function GetDeviceCaps Lib "GDI" (ByVal hDC As Integer, ByVal nIndex As Integer) As Integer
  20.     Declare Function GetPaletteEntries Lib "GDI" (ByVal hPalette As Integer, ByVal wStartIndex As Integer, ByVal wNumEntries As Integer, lpPaletteEntries As PALETTEENTRY) As Integer
  21.     Declare Function GetBitmapBits Lib "GDI" (ByVal hBitmap As Integer, ByVal dwCount As Long, lpBits As Any) As Long
  22. #End If
  23.  
  24.